{extend name="base" /}
{block name="main"}
<div class="l-loading" style="display: block" id="htr-loading"></div>
<form id='editFrom' autocomplete='off'>
<input type='hidden' id='shopId' class='ipt' value="{$object['shopId']}"/>
<table class='htr-form htr-box-top'>
  <tr>
     <th width='150'>店铺编号<font color='red'>*</font>：</th>
     <td><input type="text" id='shopSn' name='shopSn' class='ipt' value="{$object['shopSn']}" maxLength='20' data-rule="店铺编号: required;"/></td>
  </tr>
  <tr>
     <th>店铺名称<font color='red'>*</font>：</th>
     <td><input type="text" id='shopName' class='ipt' value="{$object['shopName']}" maxLength='20' data-rule="店铺名称: required;"/></td>
  </tr>
  <tr>
     <th>联系电话<font color='red'>*</font>：</th>
     <td><input type="text" id='telephone' class='ipt' value="{$object['telephone']}" maxLength='20' data-rule="店主联系手机: required"/></td>
  </tr>
  <tr>
     <th>所属区域<font color='red'>*</font>：</th>
     <td>
        <select id="area_0" class='ipt j-areas' level="0" onchange="HTR.ITAreas({id:'area_0',val:this.value,isRequire:true,className:'j-areas'});">
	      	<option value="">-请选择-</option>
	      	{volist name="areaList" id="vo"}
	        <option value="{$vo['areaId']}">{$vo['areaName']}</option>
	        {/volist}
	     </select>
     </td>
  </tr>
  <tr>
     <th>店铺详细地址<font color='red'>*</font>：</th>
     <td><input type="text" id='shopAddress' class='ipt' style='width:500px;' value="{$object['shopAddress']}" maxLength='50' data-rule="店铺详细地址: required;"/></td>
  </tr>
  <tr>
     <th>选择店长<font color='red'>*</font>：</th>
     <td>
        {volist name="keeperList" id="vo" empty="暂时没有空余店长"}
        <label><input type="radio" class="ipt" name="staffId" <?=($object['shopId']==$vo['shopId'])?'checked':'';?> value="{$vo['staffId']}" />{$vo['staffName']}</label>
        {/volist}
     </td>
  </tr>
  <tr>
     <th>选择店员<font color='red'>*</font>：</th>
     <td>
        {volist name="clerkList" id="vo" empty="暂时没有空余店员"}
        <label><input type="checkbox" class="ipt" name="staffId" {if $object['shopId']==$vo['shopId']}checked{/if} value="{$vo['staffId']}" />{$vo['staffName']}</label>
        {/volist}
     </td>
  </tr>
  <tr>
     <td colspan='2' align='center'>
       <input type='button' value='保存' class='btn btn-blue' onclick='javascript:save()'>
       <input type='button' value='返回' class='btn' onclick='javascript:history.go(-1)'>
     </td>
  </tr>
</table>
</form>
<script>
$(function(){
  initEdit({
    areaId:'{$object["areaId"]}',areaIdPath:'{$object["areaIdPath"]}'
  });
})
</script>
{/block}
{block name="js"}
<script src="__INDEX__/shops/shops.js?v={$v}" type="text/javascript"></script>
{/block}